package com.chat.common.vo;

import com.chat.common.enums.NoticeType;
import lombok.Builder;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author wei kunJie
 * @date 2024/4/13 17:30:24
 */
@Data
@Builder
public class NoticeVO {
    private Long publishId;//发布者
    private Long consumerId;//消费者
    private String noticeType;//通知类型
    private Date date;
    private Map<String,Object> data;//通知内容

    public static class NoticeDataBuilder{
        private Map<String,Object> data;
        public static NoticeDataBuilder builder(){
            return new NoticeDataBuilder();
        }
        private NoticeDataBuilder(){
            data=new HashMap<>();
        }
        public NoticeDataBuilder put(String key,Object value){
            this.data.put(key,value);
            return this;
        }
        public Map<String,Object> build(){
            return data;
        }
    }
}
